package com.ict.utils;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.log4j.Logger;

import com.ict.config.Config;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
import redis.clients.jedis.JedisShardInfo;
import redis.clients.jedis.ShardedJedis;
import redis.clients.jedis.ShardedJedisPool;

/**
 * @author TLC
 * 连接Redis工具类
 */

public class ConnRedisUtil {
	private static  Logger  logger=Logger.getLogger(ConnRedisUtil.class);
	public static final Jedis jedis;//非切片额客户端连接
    public static final  JedisPool jedisPool;//非切片连接池
    
    
    static { 
    	 JedisPoolConfig config = new JedisPoolConfig(); 
         config.setMaxIdle(5); 
         config.setTestOnBorrow(false); 
         jedisPool = new JedisPool(config,Config.redisIP,Config.redisPort,50000,Config.redisPasswd);
         jedis = jedisPool.getResource(); 
         logger.info("connect  redis success!");
         
    }
    
   
 


}
